package com.chujian.framework.starter.aliyun.oss;

import com.chujian.framework.starter.aliyun.AliyunAccountProperties;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author ：chujian
 * @date ：2021-01-05
 * 阿里云Oss账号整合
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class AliyunOssAccount {
    private String accessKeyId;
    private String secret;

    private String region;
    private String endpoint;
    private String defaultBucket;

    public AliyunOssAccount(AliyunAccountProperties accountProperties, AliyunOssProperties ossProperties) {
        this.accessKeyId = accountProperties.getAccessKeyId();
        this.secret = accountProperties.getSecret();

        this.region = ossProperties.getRegion();
        this.endpoint = ossProperties.getEndpoint();
        this.defaultBucket = ossProperties.getDefaultBucket();
    }

}
